<div class="audio-panel" data-behavior="audio_target toggle_audio_panel">
    <% if @now_playing %>
      <% present @now_playing do |entry_presenter| %>
        <% if entry_presenter.has_enclosure? %>
          <%= render partial: "entries/audio_markup", locals: {entry: @now_playing} %>
          <script type="text/javascript">
              <% if @recently_played %>
                  feedbin.data.progress[<%= @recently_played.entry_id %>] = {progress: <%= @recently_played.progress %>, duration: <%= @recently_played.duration %>}
              <% end %>
              $(function() {
                  feedbin.initPlayer(false);
                  $('body').addClass("animate-panel")
              })
          </script>
        <% end %>
      <% end %>
    <% end %>
</div>
